﻿
config.eventcfg = {
		delsub: function(){
			var records = this.grid.getSelectionModel().getSelections();
			if (!JxUtil.selected(records)) return;
			
			var self = this;
			//取选择记录的主键值
			var params = 'funid='+ self.define.nodeid;
			for (var i = 0; i < records.length; i++) {
				params += '&keyid=' + records[i].get(self.define.pkcol);
			}

			//设置请求的参数
			params += '&pagetype=subeditgrid&eventcode=delsub';

			//执行处理的内容
			var endcall = function(data) {
				//重新加载数据
				self.grid.getStore().reload();
			};

			//发送请求
			Request.postRequest(params, endcall);
		}
	};

	